
<ul nz-menu [nzMode]="'horizontal'">
  <li permission="SID00004" nz-menu-item (click)="add(title, content, footer)">
    <i class="anticon anticon-plus"></i>添加</li>
  <li permission="SID00004" nz-menu-item (click)="update(title, content, footer)">
    <i class="anticon anticon-copy"></i>修改</li>
  <li permission="SID00006" nz-menu-item (click)="delete()">
    <i class="anticon anticon-delete"></i>删除</li>
</ul>
<nz-table #nzTable [nzDataSource]="data" nzSize="middle" [nzBordered]="true" [nzScroll]="{ x: 1024, y: 400}" [nzIsPagination]="false">
  <thead nz-thead>
    <tr>
      <th nz-th [nzCheckbox]="true">
        <label nz-checkbox [(ngModel)]="allChecked" [nzIndeterminate]="indeterminate" (ngModelChange)="checkAll($event)">
        </label>
      </th>
      <th nz-th>
        <span>所属端</span>
      </th>
      <th nz-th>
        <span>图片</span>
      </th>
      <th nz-th>
        <span>操作类型</span>
      </th>
      <th nz-th>
        <span>链接地址</span>
      </th>
      <th nz-th>
        <span>资讯地址</span>

    </tr>
  </thead>
  <tbody nz-tbody>
    <tr nz-tbody-tr *ngFor="let datas of data">
      <td nz-td [nzCheckbox]="true">
        <label nz-checkbox [nzDisabled]="datas.disabled" [(ngModel)]="datas.checked" (ngModelChange)="refreshStatus($event)">
        </label>
      </td>
      <td nz-td>
        <a>{{datas.discription}}</a>
      </td>
      <td nz-td>
        <span style="margin-right: 8px;">
          <img (click)="showImage(datas.url) " style="height: 60px;width: 60px " src="{{config.IP+config.API.getUpload+datas.url}} ">
        </span>
      </td>
      <td nz-td >
        {{datas.operateType | constantTransfer:advertisementTypes}}
      </td>
      <td nz-td>
        {{datas.linkUrl}}
      </td>
      <td nz-td >
        <a (click)="openDocs(datas.fileUrls)"> <span>{{datas.infoTitle}}</span></a>
      </td>
    </tr>
  </tbody>
</nz-table>

<ng-template #title>
  <span>{{modelTitle}}</span>
</ng-template>
<ng-template #content>
  <advertisement-add-page (outValue)="addCall($event) " *ngIf="modal==0"></advertisement-add-page>
  <adv-modify-page  (outPut)="addCall($event) " *ngIf="modal==1" [inValue]="updateData"></adv-modify-page>
</ng-template>

<ng-template #footer>
</ng-template>

<!-- 查看图片-->
<nz-modal [nzVisible]="previewVisible " [nzContent]="modalContent " [nzFooter]="null " (nzOnCancel)="previewVisible=false ">
  <ng-template #modalContent>
    <img [src]="previewImage " [ngStyle]="{ 'width': '100%' } " />
  </ng-template>
</nz-modal>
